'use strict';
// 关联数据库
const db = uniCloud.database();
// 获取指令
const dbCmd = db.command;
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	
	// 关联数据库表
	const userData = db.collection("users");
	
	let res = await userData.doc("65b75b3af08210b07d34121a").set({
		// 会覆盖原值
		age: 30
	});
	
	return {
		res,
		msg: "修改成功"
	}
};
